#include "iostream"
#include "string"
#define Day_hour 24
#define hour_min 60
#define min_second 60

#define DAY_second (Day_hour * hour_min * min_second)
using namespace std;
int main(void)
{
    long long secends;   // 表示秒数
    std::cin >> secends; // 输入秒数
    int s_day, s_hour, s_min, s_second;
    int s_day_y, s_hour_y, s_min_y, s_second_y;
    // int day = secends / min_second / hour_min / Day_hour;
    // cout << secends / DAY_second;
    if (secends % DAY_second == 0)
    {
        s_day = secends / DAY_second;
        cout << s_day << " days"
             << ", 0 hours"
             << ", 0 minutes"
             << ", 0 seconds" << endl;
    }
    else
    {
        s_day = secends / DAY_second;
        cout << s_day << " days";
        s_hour_y = (secends - (s_day * Day_hour * hour_min * min_second)) / min_second / hour_min;
        cout << s_hour_y;
        // if (s_day_y % hour_min == 0)
        // {
        //     s_hour = s_day_y / hour_min;
        //     cout << s_day << " days"
        //          << "," << s_hour << " hours"
        //          << ", 0 minutes"
        //          << ", 0 seconds" << endl;
        // }
        // else
        //     s_hour = s_day_y / hour_min;
        // s_hour_y = s_day_y % hour_min;
        // {
        //     if (s_hour_y % min_second == 0)
        //     {
        //         s_min = s_hour / min_second;
        //         cout << s_day << " days"
        //              << "," << s_hour << " hours"
        //              << "," << s_min << " minutes "
        //              << ", 0 seconds" << endl;
        //     }
        //     else
        //     {
        //         s_min = s_hour_y / min_second;
        //         s_min_y = s_hour_y % min_second;
        //         cout << s_day << " days"
        //              << "," << s_hour << " hours"
        //              << "," << s_min << " minutes "
        //              << ", " << s_min << " seconds" << endl;
        //     }
        // }
    }
}